import React from 'react';
import { UserOutlined } from '@ant-design/icons';
import {  Outlet } from "react-router-dom";
const UserList = React.lazy(() => import('@/pages/user/userList'));
const UserInfo = React.lazy(() => import('@/pages/user/userInfo'));
const Detail = React.lazy(() => import('@/pages/user/userList/details'));
const routers: Route[] = [
  {
    name: '用户',
    path: '/sys/user',
    element: <Outlet />,
    icon: <UserOutlined />,
    children: [
      {
        name: '用户信息',
        path: '/sys/user/info',
        element: <UserInfo />,
        icon: <UserOutlined />,
      },
      {
        name: '用户列表',
        path: '/sys/user/list',
        element: <UserList />,
        icon: <UserOutlined />,
      },
      {
        name: '用户详情',
        path: '/sys/user/list/detail',
        element: <Detail />,
        icon: <UserOutlined />,
        hidden: true,
      },
    ],
  },
];
export default routers;
